package com.pudding.base;

import com.pudding.tools.ModelUtil;
import dev.langchain4j.data.image.Image;
import dev.langchain4j.model.image.ImageModel;
import dev.langchain4j.model.openai.OpenAiImageModel;
import dev.langchain4j.model.output.Response;

public class ImageDemo {
    public static void main(String[] args) {
        ImageModel model = OpenAiImageModel.builder()
                .baseUrl(ModelUtil.BASE_URL_OPENAI)
                .apiKey(ModelUtil.API_KEY_OPENAI)
                .build();

        Response<Image> response = model.generate("赛博朋克⻛格的汽⻋");
        System.out.println(response.content().url());
    }
}
